/**   
 * Copyright © 2016 公司名. All rights reserved.
 * 
 * @Title: ServiceorServiceImpl.java 
 * @Prject: LianniuManager
 * @Package: com.lianniu.mgr.privateKey.service.impl
 * @Description: TODO
 * @author: Administrator   
 * @date: 2016年11月14日 下午2:04:52 
 * @version: V1.0   
 */
package com.lianniu.mgr.privateKey.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import com.lianniu.mgr.base.BaseResult;
import com.lianniu.mgr.baseService.staff.model.StaffVo;
import com.lianniu.mgr.pagination.PaginationInfo;
import com.lianniu.mgr.privateKey.dao.ServiceorDao;
import com.lianniu.mgr.privateKey.service.IServiceorService;

/** 
 * @ClassName: ServiceorServiceImpl 
 * @Description: 业务员
 * @author: Administrator
 * @date: 2016年11月14日 下午2:04:52  
 */
@Service("serviceorService")
public class ServiceorServiceImpl implements IServiceorService {

    private final static Logger logger = Logger.getLogger(ServiceorServiceImpl.class);
    
    @Resource
    private ServiceorDao serviceorDao;
   /** 
     * @Title: getServiceorList
     * @Description: 业务员列表
     * @author: Administrator   
     * @param staffVo
     * @param paginationInfo
     * @return 
     * @see com.lianniu.mgr.privateKey.service.IServiceorService#getServiceorList(com.lianniu.mgr.baseService.staff.model.StaffVo, com.lianniu.mgr.pagination.PaginationInfo)
     * @date: 2016年11月14日 下午2:04:52 
     */
    @Override
    public BaseResult getServiceorList(StaffVo staffVo, PaginationInfo paginationInfo) {
        logger.info("getServiceorList begin");
        staffVo.setPaginationInfo(paginationInfo);
        List<StaffVo> list = serviceorDao.getStaffListForPage(staffVo);
        Map<String, Object> retmap = new HashMap<String, Object>();
        retmap.put("total", paginationInfo.getTotalRecord());
        retmap.put("curPage", paginationInfo.getCurPage());
        retmap.put("rows", list);
        logger.info("getServiceorList end");
        return BaseResult.success(retmap);
    }

}
